﻿namespace HCMS.HttpApi.Site.MiddlewareExtensions
{
    /// <summary>
    /// 中间件 核心扩展
    /// </summary>
    public static class CoreMiddlerware
    {
        /// <summary>
        /// Swagger Basic 认证
        /// </summary>
        /// <remarks>
        /// 登录成功，才能查看接口文档
        /// </remarks>
        /// <param name="app"></param>
        /// <returns></returns>
        public static IApplicationBuilder UseSwaggerBasicAuth(this IApplicationBuilder app)
        {
            return app.UseMiddleware<SwaggerBasicAuthMiddleware>();
        }
    }
}